package io.dataease.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.dataease.base.domain.ChartGroup;
import io.dataease.base.domain.Datasource;
import io.dataease.base.domain.DatasourceExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DatasourceMapper extends BaseMapper<Datasource> {
    long countByExample(DatasourceExample example);

    int deleteByExample(DatasourceExample example);

    int deleteByPrimaryKey(String id);

    @Override
    int insert(Datasource record);

    int insertSelective(Datasource record);

    int syncInsertSelective(Datasource record);

    List<Datasource> selectByExampleWithBLOBs(DatasourceExample example);

    List<Datasource> selectByExample(DatasourceExample example);

    Datasource selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Datasource record, @Param("example") DatasourceExample example);

    int updateByExampleWithBLOBs(@Param("record") Datasource record, @Param("example") DatasourceExample example);

    int updateByExample(@Param("record") Datasource record, @Param("example") DatasourceExample example);

    int updateByPrimaryKeySelective(Datasource record);

    int updateByPrimaryKeyWithBLOBs(Datasource record);

    int updateByPrimaryKey(Datasource record);


    void createTableChart_view();
    void createTableDataset_table_field();
    void createTableDataset_table();
    void createTableDatasource();
    void chart_group();

    List<ChartGroup> listChartGroup();

    List<Datasource> selectListDa();

    void createTableChart_Group();
}